package com.keke.beauty.sys.weixin.wechat;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;

@Data
@Component
@ConfigurationProperties(prefix = "wx.mp")
public class WechatAccountConfig {
    private List<WxMpProperties.MpConfig> configs;

    @Data
    public static class MpConfig {
        /**
         * 设置微信公众号的appid
         */
        private String appId;

        /**
         * 设置微信公众号的app secret
         */
        private String secret;

        /**
         * 设置微信公众号的token
         */
        private String token;

        /**
         * 设置微信公众号的EncodingAESKey
         */
        private String aesKey;
    }

    public List<WxMpProperties.MpConfig> getConfigs() {
        return configs;
    }

    public void setConfigs(List<WxMpProperties.MpConfig> configs) {
        this.configs = configs;
    }
}
